package haizhi.fruitmall.pojo.view;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @Date: 2017/12/23 10:32
 * @Author: Richard Zane
 */

@Data
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class GoodsCategoryView {

    private Integer categoryId;

    private String categoryName;

    private String picturePath;

    private List<GoodsCategoryView> children = new ArrayList<>();

    public void addChild(GoodsCategoryView child){
        children.add(child);
    }
}
